package com.xxxx.yeb.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xxxx.yeb.mapper.SalaryMapper;
import com.xxxx.yeb.pojo.*;
import com.xxxx.yeb.service.impl.EmployeeServiceImpl;
import com.xxxx.yeb.service.impl.SalaryServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 2 * @Author: yangxin
 * 3 * @Date: 2020/7/23 19:05
 * 4员工账套管理模块
 */
@RestController
@RequestMapping("/salary/sobcfg")
public class SalarySetContrller {
    @Autowired
    private SalaryServiceImpl salaryService;
    @Autowired
    private EmployeeServiceImpl employeeService;

    /**
     * @param * @param
     * @return 查询所有工资账套
     * @author yangxin
     * @date 2020/7/24
     */
    @ApiOperation(value = "查询所有工资账套")
    @GetMapping("/salaries")
    public List<Salary> queryAllSalaries() {
        return salaryService.queryAllSalaries();
    }

    /**
     * @param * @param employeeQuery
     * @return
     * @author yangxin
     * @date 2020/7/24
     */
    @ApiOperation(value = "查询所有员工工资账套")
    @GetMapping("/")
    public EmployeeQuery queryAllEmployeeSal(EmployeeQuery employeeQuery) {
        return employeeService.selectAllEmployeeSal(employeeQuery);
    }

    /**
     * @param * @param employeeQuery
     * @return
     * @author yangxin
     * @date 2020/7/24
     */
    @ApiOperation(value = "更新员工工资账套")
    @PutMapping("/")
    public RespBean updateEmployeeSal(EmployeeQuery employeeQuery) {
        return employeeService.updateEmployeeSal(employeeQuery);
    }

}
